﻿#region Includes

using System;

#endregion

namespace ArtheaEngine.Model
{
    public partial class HelpTag : IEquatable<HelpTag>
    {
        protected HelpTag()
        {
        }

        public HelpTag(Help help, string text)
        {
            Help = help;
            Tag = text;
        }

        #region Implementation of IEquatable<HelpTag>

        public override bool Equals(object obj)
        {
            if (!(obj is HelpTag)) return false;

            return Equals(obj as HelpTag);
        }

        public override int GetHashCode()
        {
            return Tag.GetHashCode();
        }

        /// <summary>
        ///                     Indicates whether the current object is equal to another object of the same type.
        /// </summary>
        /// <returns>
        /// true if the current object is equal to the <paramref name="other" /> parameter; otherwise, false.
        /// </returns>
        /// <param name="other">
        ///                     An object to compare with this object.
        ///                 </param>
        public bool Equals(HelpTag other)
        {
            return String.Compare(Tag, other.Tag, true) == 0;
        }

        #endregion
    }
}